package Day08;

class Apple{
    private String color;
    private double weight;
    public Apple(){

    }
    public Apple(String color,double weight){
        this.color = color;
        this.weight = weight;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String toString(){
        return "Apple[color=" + color + ",weight=" + weight + "]";
    }
}

public class ToStringText {
    public static void main(String[] args) {
        Apple a = new Apple("红色",5.68);
        System.out.println(a);
    }
}
